package com.gzhryc.shared_device.base.enums;

import com.gzhryc.pay.PayConstants;

public enum EPayType {

    EWallet(1,"钱包支付"),Alipay(PayConstants.TypeAlipay,"支付宝支付"),WXPay(PayConstants.TypeWxpay,"微信支付")
    
    ,EVirtual(7,"虚拟币支付"),CloudPay(8,"云支付")
    
    ,AliComposePay(12,"支付宝组合支付"),WXComposePay(13,"微信组合支付");

    private Integer index;
    private String note;

    EPayType(Integer index,String note){
        this.index = index;
        this.note = note;
    }

    public Integer index() {
        return index;
    }

    public String note(){
        return note;
    }

    public static EPayType get(Integer index) {
        EPayType[] temp = EPayType.values();
        for(int i=0;i<temp.length;i++){
            EPayType item = temp[i];
            if(item.index.equals(index)){
                return item;
            }
        }
        return null;
    }

    public static String note(Integer index){
        EPayType[] temp = EPayType.values();
        for(int i=0;i<temp.length;i++){
            EPayType item = temp[i];
            if(item.index.equals(index)){
                return item.note;
            }
        }
        return null;
    }
}
